<?php
error_reporting(E_ALL^ E_NOTICE);
ini_set('display_errors','On');

$username="ima";
$password= "ima2006";
$assetID=203;
if($_REQUEST['assetID']!="")
{
  $assetID=$_REQUEST['assetID'];
}
/****************start getting data********************/
$ch = curl_init("http://www.mathinstitutes.org/math-videos/metadata/v1/asset/".$assetID);    

$options = array(
 CURLOPT_RETURNTRANSFER => true,
 CURLOPT_HEADER => false,   //true or false to show header in result
 CURLOPT_USERPWD=>"$username:$password");

// Setting curl options
curl_setopt_array( $ch, $options ); 
$result = curl_exec($ch);
$obj=json_decode($result);
curl_close($ch);
//header('HTTP/1.1  200 OK');
//header('Content-type: application/json');

if(isset($_REQUEST['callback']))
{
  echo $_REQUEST['callback']. '(' . $result . ');';
	return;
}
echo $result;

print_r($obj);

?>